try:
    with open('result.txt','r',encoding='utf-8') as f:
        result=f.read()
    result=result.replace('，',',').replace(' ','')
    result_list=result.split(',')
    print(result_list)
    for i in list(set(result_list)):
        with open('esultxt.txt', 'a+') as f:
            f.write(i+':'+str(result_list.count(i))+'次'+'\n')
except:
    print('没找到文件')

